package ac.technion.StreamMania;



import android.app.Activity;
import android.graphics.PixelFormat;

import android.os.Bundle;
import android.view.SurfaceHolder;
import android.view.SurfaceView;


public class AndroidVideoPlayer extends Activity implements SurfaceHolder.Callback{

	SurfaceView surfaceView;
	SurfaceHolder surfaceHolder;
	
	 /** Called when the activity is first created. */

	 public void onCreate(Bundle savedInstanceState) {
	
		 super.onCreate(savedInstanceState);
	     getWindow().setFormat(PixelFormat.UNKNOWN);
	     surfaceView = (SurfaceView)findViewById(R.id.surfaceview);
	     surfaceHolder = surfaceView.getHolder();
	     surfaceHolder.addCallback(this);
	     surfaceHolder.setFixedSize(1280, 720);
	     surfaceHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
	 }
	
	
	
	public SurfaceHolder setVideo() {
	 surfaceView.setVisibility(0);
	 
	 return surfaceHolder;
	}
	
	
	
	public void surfaceChanged(SurfaceHolder holder, int format, int width,
			int height) {
		// TODO Auto-generated method stub
		
	}
	
	
	
	public void surfaceCreated(SurfaceHolder holder) {
		// TODO Auto-generated method stub
		
	}
	
	
	
	public void surfaceDestroyed(SurfaceHolder holder) {
		// TODO Auto-generated method stub
		
	}
}